package soccerteam.model.service;

import java.sql.SQLException;
import java.util.ArrayList;

import baseballteam.vo.GameInfoVO;
import baseballteam.vo.PitcherInfoVO;

import soccerteam.model.dao.SoccerTeamDAO;
import soccerteam.vo.PlayerInfoVO;
import soccerteam.vo.PlayerVO;
import soccerteam.vo.SCGameInfoVO;
import soccerteam.vo.SoccerTeamVO;

public class SoccerTeamService {
	private SoccerTeamDAO dao;
	public void setSoccerTeamDAO(SoccerTeamDAO dao){
		this.dao = dao;
	}
	public ArrayList selectAllTeam() {
		return (ArrayList)dao.selectAllTeam();
	}
	public SoccerTeamVO selectTeamInfo(String id) {
		
		return (SoccerTeamVO)dao.selectTeamInfo(id);
	}
	public ArrayList selectPlayer(String id) {
		
		return dao.selectPlayer(id);
	}
	public PlayerVO selectPlayerInfo(String playerNo) {
		return (PlayerVO) dao.selectPlayerInfo(playerNo);
	}
	public ArrayList listPlayerInfo(String playerNo) {
		return (ArrayList) dao.listPlayerInfo(playerNo);
	}
	public ArrayList listGeamInfo()throws SQLException {
		
		return (ArrayList) dao.listGameInfo();
	}
	
	public ArrayList insertTeam(SoccerTeamVO svo) throws SQLException{
		return (ArrayList)dao.insertTeam(svo);
	}
	public ArrayList deleteTeam(String team_no) throws SQLException{
		return (ArrayList)dao.deleteTeam(team_no);
	}
	public ArrayList updateTeam(SoccerTeamVO svo) throws SQLException{
		return (ArrayList)dao.updateTeam(svo);
	}
	public PlayerVO selectPlayerByName(String playerName) {
		return (PlayerVO)dao.selectPlayerByName(playerName);
	}
	public void insertPlayer(PlayerVO pvo) {
		dao.insertPlayer(pvo);
	}
	public void deletePlayer(String playerNo) {
		dao.deletePlayer(playerNo);
	}
	public void updatePlayer(PlayerVO pvo) {
		dao.updatePlayer(pvo);
		
	}
	public int selectPitcherInfoNo() {
		return dao.selectPitcherInfoNo();
	}
	public void insertPlayerInfo(PlayerInfoVO pvo) {
		dao.insertPlayerInfo(pvo);
	}
	public void deletePlayerInfo(String no) {
		dao.deletePlayerInfo(no);
		
	}
	public ArrayList deleteGameInfo(String play_no) {
		return (ArrayList)dao.deleteGameInfo(play_no);
	}
	public ArrayList insertGameInfo(SCGameInfoVO gvo) {
		return (ArrayList)dao.insertGameInfo(gvo);
	}

	
}
